<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="css/bootstrap.css" />
		<script type="text/javascript" src="scripts/jquery/jquery-1.7.1.js"></script>

		<link href="style/authority/common_style.css" rel="stylesheet" type="text/css">

		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
		<title>审计知识库管理</title>

		<style type="text/css">
			
		</style>
	</head>

	<body>
		
		<div style="margin-left:0px ;">
			<div style="background-color: #EEEEEE;height: 30px;padding-top: 10px;">
				&nbsp;&nbsp;<span style="color:#98D237" class="glyphicon glyphicon-open" data-toggle="modal" data-target="#myModal"> </span>&nbsp;<span>上传</span>&nbsp;&nbsp;
	
			</div>
			<table class="table table-bordered">
				<thead>
					<tr>
						<th>知识要点</th>
						<th>资料名称</th>
						<th>发布时间</th>
						<th>状态</th>
						<th>操作</th>

					</tr>
				</thead>
				<tbody>
					<tr th:each="l:${list}">

						<td th:text="${l.point}">Bangalore</td>
						<td th:text="${l.name}">33</td>
						<td th:text="${#dates.format(l.creationDate,'yyyy年MM月dd日')}">44</td>
						<td th:if="${l.status}==1">成功</td>
						<td th:if="${l.status}==0">失败</td>
						<td th:size="50px">
                            <a th:href="@{/del(id=${l.id})}"><input type="button" value="删除" class="ui_input_btn01" /></a></td>
					</tr>

				</tbody>
			</table>

		</div>


		<div class="ui_tb_h30">
			<div class="ui_flt" style="height: 30px; line-height: 30px;">
				共有
				<span class="ui_txt_bold04" th:text="${total}">90</span> 条记录，当前第
				<span class="ui_txt_bold04" th:text="${page+1}">1</span>
				<span>/</span>
				<span th:text="${pages+1}"></span>

			</div>
			<div class="ui_frt">
				<span id="page" style="display: none" th:text="${page}"></span><span style="display: none" id="pages" th:text="${pages}"></span>
				<!--    如果是第一页，则只显示下一页、尾页 -->
				<a th:href="@{/repository(page=0)}"><input type="button" value="首页" class="ui_input_btn01" /></a>
				<a th:if="${page==0}"><input type="button" value="上一页" class="ui_input_btn01" /></a>
				<a th:if="${page!=0}" th:href="@{/repository(page=${page-1})}" ><input type="button" value="上一页" class="ui_input_btn01" /></a>

				<a th:if="${page!=pages}" th:href="@{/repository(page=${page+1})}" ><input type="button" value="下一页" class="ui_input_btn01" /></a>
				<a th:if="${page==pages}" ><input type="button" value="下一页" class="ui_input_btn01" /></a>
				<a th:href="@{/repository(page=${pages})}"><input  type="button" value="尾页" class="ui_input_btn01"  /></a>
				<!--     如果是最后一页，则只显示首页、上一页 -->
				转到第<input type="text" id="jumpNumTxt" class="ui_input_txt01" />页
				<input type="button" onclick="go()"  class="ui_input_btn01" value="跳转" />
				<a id="a2"></a>
			</div>

		</div>


		
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog ">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" 
						aria-hidden="true">×
				</button>
				<h4 class="modal-title"id="myModalLabel">
						附件上传
				</h4>
			</div>
			<form action="/upload" method="post" enctype="multipart/form-data">
			<div class="modal-body">
				<input type="file" name="file" style="padding-bottom: 40px;" class="form-control" id="inputfile">
				<h4>知识要点</h4>
				<label class="checkbox-inline">
					<input type="checkbox" name="g"  value="内部制度"> 内部制度
				</label>
				<label class="checkbox-inline">
					<input type="checkbox" name="g"  value="外部制度"> 外部制度
				</label>
				<label class="checkbox-inline">
					<input type="checkbox" name="g"  value="培训资料"> 培训资料
				</label>
				<label class="checkbox-inline">
					<input type="checkbox" name="g"  value="审计内相关资料"> 审计内相关资料
				</label>
				<label class="checkbox-inline">
					<input type="checkbox" name="g"  value="审计外相关资料"> 审计外相关资料
				</label>
				
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" 
						data-dismiss="modal">关闭
				</button>
				<button type="submit" class="btn btn-primary">
					提交更改
				</button>
			</div>
			</form>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->














	</body>

</html>
<script>

	function go() {
		var page1=$("#jumpNumTxt").val();
		var page=parseInt(page1);
		var pages=$("#pages").text();
		var pagess=parseInt(pages)+1;
		if(!(page1.trim())){
		    alert("跳转框不能为空哦")
		}else if(page>pagess){
		    alert("跳转框不能超出最大的页哦")
		}else if(page<=0){
            alert("跳转框不能填0或者0以下的哦")
		}else{
            var pp=page-1;
		    $("#a2").attr("href","/repository?page="+pp)
            document.getElementById("a2").click();
		}
    }


</script>